<template>
    <view class="flex-col justify-start page">
      <view class="flex-col section">
        <view class="flex-col group_2">
          <view class="flex-col section_2">
            <view class="flex-row items-center group_3">
              <text class="font">写信挽回</text>
              <text class="text_2 ml-7">将你的浪漫表达给对方</text>
            </view>
            <view class="flex-col section_3">
              <text class="self-start font_2 text_3">匿名短信</text>
              <view class="flex-row items-center self-stretch mt-6-5">
                <view class="flex-col flex-1">
                  <text class="self-stretch font_3 text_4">那些说不出口的话，就由匿名信替你说吧</text>
                  <view class="mt-32 flex-col justify-start items-center self-start text-wrapper" @click="go('写信')">
                    <text class="text_5">开始写信</text>
                  </view>
                </view>
                <img
                  class="shrink-0 image_2 ml-10-5"
                  src="static/newimage/shouyenv.png"
                />
              </view>
            </view>
          </view>
          <view class="flex-row items-center section_4 mt-10-5">
            <view class="flex-row flex-1">
              <img
                class="shrink-0 image_3"
                src="static/newimage/dianhua.png"
              />
              <view class="flex-col items-start flex-1 group_4 ml-10-5">
                <text class="font">挽回电话</text>
                <text class="font_3 mt-15">别让拉黑成为你们的遗憾</text>
              </view>
            </view>
            <view @click="go('电话')" class="ml-20 flex-col justify-start items-center shrink-0 text-wrapper_2">
              <text class="font_2">去拨打</text>
            </view>
          </view>
          <view class="flex-row items-center section_4 mt-10-5">
            <view class="flex-row flex-1">
              <img
                class="shrink-0 image_4"
                src="static/newimage/rengong.png"
              />
              <view class="ml-10 flex-col items-start flex-1 group_5">
                <text class="font text_6">人工传话</text>
                <text class="font_3 text_7 mt-15">更有仪式感、成功率更高</text>
              </view>
            </view>
            <view @click="go('传话')" class="ml-20 flex-col justify-start items-center shrink-0 text-wrapper_2">
              <text class="font_2">去传话</text>
            </view>
          </view>
        </view>
      </view>
    </view>
</template>

<script>
	export default {
		onLoad() {
			//源代码  未处理
		// 	        if (navigator.userAgent.indexOf('AlipayClient') > -1) {
        //     // 网页向小程序 postMessage 消息
        //     my.postMessage({
        //         msgType : 1
        //     });
        //     // 接收来自小程序的消息。
        //     my.onMessage = function(e) {
        //         if(e.msgType==1){
        //             $("#miniName").html(e.miniName);
        //             localStorage.setItem('sharedData', JSON.stringify(
        //                     { 'openId':e.openId,
        //                         'miniType':e.miniType,
        //                         'userId':e.userId,
        //                         'appId': e.appId ,
        //                         'miniName':e.miniName,
        //                         'asdfg':e.asdfg}));
        //         }
        //     }
        // }
		
		uni.setNavigationBarTitle({
		  title: '写信挽回', 
		});
		
		},
		data() {
			return {
				
			}
		},
		methods: {
	    go(type){
			let url = "";
			switch (type){
				case '写信':
				url = "/pages/rgch/rgch";
				break;
				case '电话':
				url = "/pages/phone/phone";
				break;
				case '传话':
				url = "/pages/rgch/rgch";
				break;
			}
          if(url){
			  uni.switchTab({url:url})
		  }
		},			
		}
	}
</script>

<style scoped>
@import url("/static/acss/index.css");
@import url("/static/acss/common.css");
.page{
	height: 100%;
}
uni-page-body, uni-page-refresh{
	height: 100%;
}
</style>
